<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head runat="server">
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0,user-scalable=no" />
    <title>二维码</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/style.css" />
</head>
<body>
    <form id="form1" runat="server">
        <div class="code">
            <div class="top" id="info" runat="server">
                <div class="user_img">
                    <img src=""></div>
                <div class="user">
                    <span class="user_inf"><span class="username" id="nickname"></span><span class="sex"><img src="${pageContext.request.contextPath }/images/bg_user.png"></span></span>
                    <span class="add"></span>
                </div>
            </div>
            <div class="middle" id="imageurl" runat="server">
                <img></div>
            <div class="bottom">扫一扫上面的二维码</div>
        </div>
    </form>
</body>
</html>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-1.8.2.js"></script>
<script type="text/javascript">

	$(function(){
		$.get("${pageContext.request.contextPath }/api/getUserInfo",function(resp){
			$(".nickname").html(resp.nickname);
			$(".user_img img").attr("src",resp.headimgurl);
		});
		$.get("${pageContext.request.contextPath }/car/getCarInfo",function(resp){
			console.log(resp);
			$(".add").html(resp.car_num);
			$("#imageurl img").attr("src","${pageContext.request.contextPath }/qr/"+resp.qrcde_url);
		})
	})
	
</script>
